#!/usr/bin/env python
import os
os.environ['DJANGO_SETTINGS_MODULE'] = 'settings'
from google.appengine.dist import use_library
use_library('django', '1.2')

from google.appengine.ext import webapp
from google.appengine.ext.webapp.util import run_wsgi_app
from google.appengine.ext.webapp import template

class StudentPage(webapp.RequestHandler):
    def get(self):
        lectureKey = self.request.get("lectureKey")
        if lectureKey:
            viewVals={}
            viewVals['lectureKey'] = lectureKey
            self.response.out.write(template.render('view/student.djhtml', viewVals))
        else:
            self.redirect("/page_not_found")#add explanation

application = webapp.WSGIApplication([(r'.*', StudentPage)],debug=True)

def main():
    run_wsgi_app(application)
    
if __name__ == '__main__':
    main()